<form action="" method="post" enctype="multipart/form-data" id="form_submit" class="form_submit">
  {if $smarty.get.type eq "edit"}
  	<input type="hidden" name="type" value="editt" />
    <input type="hidden" name="id" value="{$smarty.get.id}" />
  {else}
  	<input type=hidden name="type" value="add" />
  {/if}
  <div id="admin_tabs_main_content"> 
    <!-- TABS_NAME -->
    <ul>
      <li><a href="#General">Общие</a></li>
    </ul>
    <!-- END TABS_NAME --> 
    <!-- ОБЩИЕ -->
    <div id="General">
      <div style="width:730px;">
      
      {if $smarty.get.type eq "edit"}
        <p class="position_name">Запись создана</p>
        <p class="position_input">{$Field.date_create}<input type="hidden" name="date_create" value="{$Field.date_create}" /></p>
        
        <p class="position_name">Запись обновлена</p>
        <p class="position_input">{$Field.date_update}</p>	
      {/if}

        <p class="position_name">Порядок</p>
        <p class="position_input"><input type="text" name="por" value="{$Field.por}" class="por-field"></p>
        
        <p class="position_name">Активна</p>
        <p class="position_input"><input type="checkbox" class="mini-switch" name="show" value="1"{if $Field.show} checked="checked"{/if} /></p>
        
        <p class="position_name">Родительская группа</p>
        <p class="position_input">{$GROUPS}</p>                
        
        <p class="position_name">Название раздела</p>
        <p class="position_input"><input type="text" name="name" value="{$Field.name}" class="name"></p>
        
        <p class="position_name">Системное имя</p>
        <p class="position_input"><input type="text" name="sys_name" value="{$Field.sys_name}" class="sys_name"></p>
        
        <p class="position_name">Контроллер</p>
        <p class="position_input"><select name="module"><option value="">Выберите контроллер</option>{foreach $MODULES_LIST as $ID => $Name}<option value="{$ID}"{if $Field.module eq $ID} selected="selected"{/if}>{$Name}</option>{/foreach}</select></p>        
        
        <p class="position_name">Темплейт</p>
        <p class="position_input"><select name="template"><option value="">Выберите темплейт</option>{foreach $TPL_LIST as $ID => $Name}<option value="{$ID}"{if $Field.template eq $ID} selected="selected"{/if}>{$Name}</option>{/foreach}</select></p>

        <p class="position_name">Показать в меню</p>
        <p class="position_input"><input type="checkbox" class="mini-switch" name="is_menu" value="1"{if $Field.is_menu} checked="checked"{/if} /></p>        
        
        <p class="position_name">Редирект</p>
        <p class="position_input"><input type="text" name="redirect" value="{$Field.redirect}"></p>
     
      </div>
    </div>
  </div>
  <div id="posbutton">
    <a href="javascript:void(0);" class="ui_wo_buttons but_primenit ui-state-default ui-corner-all"><span class="ui-icon ui-icon-refresh"></span>Применить</a> 
    <a href="javascript:void(0);" class="ui_wo_buttons but_save ui-state-default ui-corner-all"><span class="ui-icon ui-icon-disk"></span>Сохранить</a>
  </div>
</form>
<script type="text/javascript">
var parent    = '{$smarty.get.parent}';
</script> 
<script type="text/javascript">
$(function()
{
	$(".name").GoogleTranslate("{$smarty.const.PRFX}structure", {$ID_ACTION});
	var eForm = $("#form_submit");
	$(".but_primenit").live("click", function(){
		eForm.attr("action", "?m=structure&type=edit&id={$ID_ACTION}&parent={$smarty.get.parent}").submit();		
	});		
	$(".but_save").live("click", function(){
		eForm.attr("action", "?m=structure&id={$ID_ACTION}&parent={$smarty.get.parent}").submit();
	});
});
</script> 